package com.zx.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.zx.cloud.ApiVersion;
import com.zx.cloud.RequestLogging;
import com.zx.cloud.common.filter.CurrentUserId;
import com.zx.cloud.common.filter.IgnoreAuth;
import com.zx.cloud.controller.client.LoanClient;
import com.zx.cloud.domain.ChannelSource;
import com.zx.cloud.model.response.Response;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 
 * @ClassName: LoanController
 * @Description: 
 * @author: likun
 * @date: 2017年11月1日 下午6:57:00
 */
@RestController
@RequestMapping(value = ApiVersion.MANAGER_V1_PREFIX+"/channel", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class ChannelController {
	@Autowired
    private LoanClient loanClient;
	
	@RequestLogging
	@ApiOperation(value = "渠道数据", notes = "渠道数据")
	@RequestMapping(value = "/getChannelList", method = RequestMethod.POST)
	@ResponseBody
	public Response  getChannelList(@ApiParam(hidden=true,name="登录用户ID")@CurrentUserId Long userId,@RequestBody  ChannelSource channelSource){
		
		return loanClient.getChannelList(channelSource);
	}
}
